package com.lkd.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lkd.dto.VmTypeDTO;
import com.lkd.entity.VmType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface VmTypeMapper extends BaseMapper<VmType> {

    List<VmType> list(String name);

    boolean updateVmType(VmType vmType);

    boolean insertVmType(VmTypeDTO vmTypeDTO);
    @Delete("delete from tb_vm_type where type_id = #{vmTypeId}")
    boolean deleteVmType(String vmTypeId);
    @Select("select * from tb_vm_type where type_id = #{vmTypeId}")
    VmType getById(String vmTypeId);
}
